package org.springblade.modules.admin.vo.rescue.map;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.modules.admin.enums.MaintainPlanContentEnum;
import org.springblade.modules.admin.enums.TaskStatusEnum;

import java.util.Date;

/**
 * @Description 救援列表详情信息VO
 * @Author ysq
 * @Date 2024/3/8
 */
@Data
public class MapRescuePlanDetailListVO {

	@ApiModelProperty(value = "工单id")
	private Long planId;

	@ApiModelProperty(value = "电梯id")
	private Long elevatorId;

	@ApiModelProperty(value = "电梯设备id")
	private String deviceId;

	@ApiModelProperty(value = "电梯地址")
	private String elevatorAddress;

	@ApiModelProperty(value = "报警时间")
	private Date createTime;

	@ApiModelProperty(value = "工单状态")
	private Integer statue;

	@ApiModelProperty(value = "工单状态描述")
	private String statueName;

	@ApiModelProperty(value = "状态,-1：未订阅,0：离线,1：在线,2: 通话中")
	private Integer deviceStatus;

	public String getStatueName() {
		if (this.statue != null) {
			return TaskStatusEnum.getTaskName(MaintainPlanContentEnum.MAINTAIN_KR.getId(), this.statue);
		}
		return null;
	}
}
